package com.yupi.mianshiya.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.yupi.mianshiya.common.DeleteRequest;
import com.yupi.mianshiya.model.dto.articles.ArticleQueryRequest;
import com.yupi.mianshiya.model.entity.Articles;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.mianshiya.model.vo.ArticlesVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


public interface ArticlesService extends IService<Articles> {

    Wrapper<Articles> getQueryWrapper(ArticleQueryRequest articleQueryRequest);

    /**
     * 转换文章列表到VO列表
     * @param records
     * @return
     */
    List<ArticlesVO> convertArticlesToVO(List<Articles> records);

    /**
     * 删除文章
     * @param deleteRequest
     * @param request
     */
    void deleteArticle(DeleteRequest deleteRequest, HttpServletRequest request);
}
